package dryven.unittest.testcontrollers.dispatch;

import junit.framework.TestCase;

public class TestController {
	
	private TestDependency tDep;
	
	public enum Flavour {Sour, Sweet, Bitter, Salt};
	
	//should not be called, has no arguments
	public TestController() {
		TestCase.assertTrue(false);
	}
	
	//should not be called, only has one argument
	public TestController(TestDependency tDep) {
		TestCase.assertTrue(false);
	}
	
	public TestController(TestDependency tDep, int five) {
		super();
		this.tDep = tDep;
		this.tDep.setConstructorCalled();
		TestCase.assertEquals(5, five);	//compare expected value with injected value
	}
	
	//should not be called, double is not bound
	public TestController(TestDependency tDep, int five, double nono) {
		TestCase.assertTrue(false);
	}
	
	public void test(int v1, String v2, Flavour v3, float v5) {
		this.tDep.setMethodCalled();
		this.tDep.assertValue(0, v1);
		this.tDep.assertValue(1, v2);
		this.tDep.assertValue(2, v3);
		this.tDep.assertValue(3, v5);
	}
}
